package code.untils
{
	import code.structure.module.configs.data.ItemConfigData;
	import code.structure.module.scene.view.iso.DecorateIsoObject;
	import code.structure.module.scene.view.iso.DoorIsoObject;
	import code.structure.module.scene.view.iso.FloorIsoObject;
	import code.structure.module.scene.view.iso.FunctionBuildingIsoObject;
	import code.structure.module.scene.view.iso.RoadIsoObject;
	import code.structure.module.scene.view.iso.WallIsoObject;
	import code.structure.module.scene.view.iso.WallMuralIsoObject;
	import code.structure.module.scene.view.iso.product.ProductPloughIsoObject;
	import code.structure.module.scene.view.iso.product.ProductTreeIsoObject;
	
	import flash.geom.Point;

	/**
	 *场景中的一些常量 
	 * @author Yuri
	 * 
	 */
	public class SceneConfig
	{
		/**
		 * 测试ID 显示错误信息
		 */
		public static const TestID:Array = ["100004203243666", "100000374596806","100002515294495","100001158609737","100003106094000"
			,"100000728575175","100004886648399","100002181892655","100003106094000", "100000027545912"
			,"100002393970222","100004505650229","100005282436342","100005404082402","100000033942421"
			,"100000555064043","100004777298453","100002454492076","100000800578669","100000660163192","100001770390950"];
		/**
		 *场景内最大地图ID 
		 */		
		public static var SCENE_MAX_MAP_ID:Number = 0;
		/**
		 *diy层级 物件层 
		 */
		public static const SCENE_DIY_LAYER_OBJECT:String = "SCENE_DIY_LAYER_OBJECT";
		/**
		 *diy层级 地板层 
		 */
		public static const SCENE_DIY_LAYER_FLOOR:String = "SCENE_DIY_LAYER_FLOOR";
		
		/**
		 *正常状态 
		 */
		public static const SCENE_NORMAL:String = "SCENE_NORMAL";
		/**
		 *diy状态 
		 */
		public static const SCENE_DIY:String = "SCENE_DIY";
		
		/**
		 *正常情况 
		 */
		public static const SCENE_NORMA_NORMAL:String ="SCENE_NORMA_NORMAL";
		
		/**
		 *播种 
		 */
		public static const SCENE_NORMA_PLANT:String ="SCENE_NORMA_PLANT";
		
		/**
		 *正常 移动和添加 
		 */
		public static const SCENE_DIY_NORMAL:String ="SCENE_DIY_NORMAL";
		/**
		 * 卖 
		 */
		public static const SCENE_DIY_SELL:String = "SCENE_DIY_SELL";
		/**
		 *回收 
		 */
		public static const SCENE_DIY_RECYCLE:String = "SCENE_DIY_RECYCLE";
		/**
		 *旋转 
		 */
		public static const SCENE_DIY_ROTATION:String = "SCENE_DIY_ROTATION";
		
		/**
		 *背景小网格 宽度 
		 */
		public static const BACKGROUND_GRID_WIDTH:Number = 320;
		/**
		 * 背景小网格 高度
		 */
		public static const BACKGROUND_GRID_HEIGHT:Number = 320;
		
		/**
		 *世界的网格x数量 
		 */
		public static const WORLD_X_NUM:int = 30;
		/**
		 *世界的网格z数量 
		 */
		public static const WORLD_Z_NUM:int = 30;
		/**
		 *世界网格尺寸 
		 */
		public static const WORLD_GRID_SIZE:int = 40;
		/**
		 *世界区块长度 
		 */
		public static const WORLD_AREA_LENGTH:int = 5;
		
		/**
		 *路的权值 
		 */
		public static const ROAD_WEIGHT:Number = 5;
		/**
		 *去好友家帮忙默认次数 
		 */
		public static const TO_FRIEND_HELP_DEFAULT_COUNT:int = 5;
		
		/**
		 *世界场景缩小比例 
		 */
		public static const WORLD_MIN_SCALE:Number = .7;
		
		/**
		 *场景换掉变化时间
		 */
		public static const SIZE_CHANGE_DURATION:Number = .1;
		/**
		 *场景移动变化时间
		 */
		public static const CAMAL_MOVE_DURATION:Number = .6;
		/**
		 *场景静态类名 
		 */
		public static const SCENE_CLASS_NAME:String = "SCENE";
		/**
		 *Icon类名 
		 */
		public static const ICON_CLASS_NAME:String = "ICON";
		/**
		 *场景生产动画类名 
		 */
		public static const SCENE_PRODUCT_ANIMATION:String = "SCENE_PRODUCT_ANIMATION";
		/**
		 * 场景成熟动画类名
		 */
		public static const SCENE_MATURE_ANIMATION:String = "SCENE_MATURE_ANIMATION";
		/**
		 * 场景枯萎动画类名
		 */
		public static const SCENE_WITHERED_ANIMATION:String = "SCENE_WITHERED_ANIMATION";
		/**
		 * 默认锁定位置 
		 */
		public static const SCENE_CENTER_GRID_POINT:Point = new Point(20,20);
		/**
		 * 场景离顶端距离
		 */
		public static const TOP_PADDING:Number = 0;
		/**
		 * 场景离下端距离 
		 */
		public static const BOTTOM_PADDING:Number = 0;
		/**
		 * 场景离左边距离 
		 */
		public static const LEFT_PADDING:Number = 0;
		/**
		 * 场景离右边距离 
		 */
		public static const RIGHT_PADDING:Number = 0;
		
		/**
		 * GM家如下（同上面同意思） 
		 */
		public static const GM_TOP_PADDING:Number = -640;
		public static const GM_BOTTOM_PADDING:Number = 0;
		public static const GM_LEFT_PADDING:Number = -640;
		public static const GM_RIGHT_PADDING:Number = -640;
		/**
		 *获取场景对象的类名 
		 * @param type
		 * @return 
		 * 
		 */
		public static function getIsoObjectClass(d:ItemConfigData):Class{
			var c:Class;
		/*	switch(d.iMarketSubType){
				case ItemTypeConst.SUB_FLOOR://地板层
					c = FloorIsoObject;
					break;
				case ItemTypeConst.SUB_WALL://墙壁
					c = WallIsoObject;
					break;
				case ItemTypeConst.SUB_WALL_DECORATION://墙壁装饰
					c = WallMuralIsoObject;
					break;
				case ItemTypeConst.SUB_REFLUSH_GOOD://刷新
					c = ProductedRefreshItemIsoObject;
					break;
				case ItemTypeConst.SUB_TREE://果树
				case ItemTypeConst.SUB_PROCUREMENT_GOODS://采购品
					c = ProductTreeIsoObject;
					break;
				case ItemTypeConst.SUB_PLANT://耕地
					if(d.iType == ItemTypeConst.PLANT_LAND)
						c = ProductPloughIsoObject;
					break;
				case ItemTypeConst.SUB_SHELF://货架
				case ItemTypeConst.SUB_OTHER_SWEET_MACHINE:
				case ItemTypeConst.SUB_ENERGY_WELL: //能量井
					c = ProductShelfIsoObject;
					break;
				case ItemTypeConst.SUB_STORAGE: //仓库建筑
					c = StorageIsoObject;
					break;
				case ItemTypeConst.SUB_BUILD://建筑
					c = ProductBuildingIsoObject;
					break;
				case ItemTypeConst.SUB_FUNCTION_BUILDING://功能性建筑
					c = FunctionBuildingIsoObject;
					break;
				case ItemTypeConst.SUB_SWEET_MACHINE:  //烹饪设施
				case ItemTypeConst.SUB_COMPOSITE_MACHINE:
//				case ItemTypeConst.SUB_OTHER_SWEET_MACHINE:
					c = ProductCookingIsoObject;
					break;
				case ItemTypeConst.SUB_FOOD_TABLE://食物台
					if(d.iType == ItemTypeConst.SNACK_TABLE){
						c = CabinetFoodTableIsoObject;
					}else
						c = FoodTableIsoObject;
					break;
				case ItemTypeConst.SUB_TABLE_CHAIR:  //桌椅
					c = TableChairIsoObject;
					break;
				case ItemTypeConst.SUB_CASHIER_TABLE: //收银台
					c = CheckstandIsoObject;
					break;
				case ItemTypeConst.SUB_DOOR: //门
					c = DoorIsoObject;
					break;
				case ItemTypeConst.SUB_RUBBISH://垃圾、杂草等
					c = RubbishIsoObject;
					break;
				case ItemTypeConst.SUB_PET:
					c = ProductPetIsoObject;
					break;
				case ItemTypeConst.SUB_SHOP:
					c = ShopIsoObject;
					break;
				case ItemTypeConst.SUB_TOTEM:
					c = TotemIsoObject;
					break;
				default:
					if(d.iType == ItemTypeConst.ROAD){
						c =RoadIsoObject;
					}else if(d.iType == ItemTypeConst.UPGRADE_DECORATE || d.iType == ItemTypeConst.UPGRADE_DECORATE_TASTE){
						c = DecorateUpIsoObjcet;
					}
					else{
						c = DecorateIsoObject;
					}
					break;
			}*/
			c = DecorateIsoObject;
			return c;
		}
	}
}